package com.zhanghe.study.exceptions;

import com.zhanghe.study.executor.ErrorContext;

/**
 * @Author: zhanghe
 * @Date: 2020/4/11 19:30
 */
public class ExceptionFactory {
    private ExceptionFactory() {
    }

    public static RuntimeException wrapException(String message, Exception e) {
        return new PersistenceException(ErrorContext.instance().message(message).cause(e).toString(), e);
    }
}
